function log(func){
  return function(fn){
    var gen = new func();
    fn(null,gen.name);
  }
}

log(function(){
  this.name = 'zhoumq';
})(function(err,result){
  console.log(result);
});
